package net.vinote.sosa.core.lang;


import java.io.Serializable;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class SosaResult<T> implements Serializable {
	/** */
	private static final long serialVersionUID = -7815723967101753647L;
	private boolean success;
	private String message;
	private T value;

	public final boolean isSuccess() {
		return success;
	}

	public final void setSuccess(boolean success) {
		this.success = success;
	}

	public final String getMessage() {
		return message;
	}

	public final void setMessage(String message) {
		this.message = message;
	}

	public final T getValue() {
		return value;
	}

	public final void setValue(T value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return ReflectionToStringBuilder.toString(this,
				ToStringStyle.SIMPLE_STYLE);
	}
}
